let ass = ['h','e','l','o']
function reverseString(ass){
    for (let left = 0,right = ass.length-1;left<right;++left,--right){
        let temp = ass[left]
        ass[left] = ass[right];
        ass[right] = temp
    }
    return ass
}

console.log(reverseString(ass))
